﻿@{
    var nonEmptyCarts = (Model.Items as IEnumerable<dynamic>)
        .Where(x => (x.Items as IEnumerable<dynamic>).Any());
}

<div class="box unit-overview shopping-cart">
    <header>
        <nav>
            <a href="@Url.Action(Loc.Act("Show").Ctrl("ShoppingCart").Area("Wizard").Localized())">@T(Res.In("Common").Of("Act").Name("Checkout"))</a>
        </nav>
        <h3>@T(Res.In("WebPortal").Of("Navigation").Of("Wizard").Name("ShoppingCart"))</h3>
    </header>
    <section>
    @if(nonEmptyCarts.Any())
    {
        Html.RenderPartial("_Items", new 
        {
            Items = nonEmptyCarts.SelectMany(x => x.Items as IEnumerable<dynamic>),
            IsOverview = true
        });
    }
    else
    {
        <span class="empty">@T(Res.In("Common").Of("Expr").Name("NoData"))</span>
    }
    </section>
</div>